package com.eBook.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eBook.dao.BookDao;
import com.eBook.dao.CommentDao;
import com.eBook.dao.TestDao;
import com.eBook.dao.UserDao;
import com.eBook.entity.Book;
import com.eBook.entity.Comment;
import com.eBook.entity.Test;
import com.eBook.entity.User;
/**
 * 
 * */
@Service
public class TestService {
	@Autowired
	private TestDao testDao;
	@Autowired
	private UserDao userDao;
	@Autowired
	private CommentDao commentDao;
	@Autowired
	private BookDao bookDao;
	public List<Test> findAllTests(){
		return testDao.findAllTests();
	}
	
	public List<Comment> findAllCommentByBookId(int id){
		return commentDao.findAllCommentsByBookId(id);
	}
	
	
	public List<Book> findAllBooksByTypeId(int typeId){
		return bookDao.findAllBooksByTypeId(typeId);
	}
}
